<?php
namespace api\common\model;
use think\Db;
class Vip extends \think\Model 
{
    protected $autoWriteTimestamp = true;
    protected $table = 'vip';
    protected $sel_vip_field = array('id','name','price','duration_time','introduce','is_recommend');

    /**
     * 查看vip
     */
    public function sel_vip(){
        $res = null;
        $res =Db::name($this->table)->field($this->sel_vip_field)->select();
        return $res;
   }

   /**
    * 根据vipid获取信息
    */
    public function sel_vip_id($id){
        $res = null;
        $filed = array('price','duration_time','vipNum');
        $res =Db::name($this->table)->field($filed)->find($id);
        return $res;
   }
}
